-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-45005: In Prompt Processing, use microservice to check for already-arrived Rubin images #192
Conversation
457dee0
to
db85f4b
Compare
python/activator/raw.py
Outdated
raise RuntimeError("Could not query raw microservice.") from e | ||
|
||
if unpacked["error"]: | ||
raise RuntimeError("Raw microservice had an unidentified error.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If error
is True
, there will be a message
element that gives more information (the exception that occurred in the server).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is message
just a string? (An actual documented spec would be nice, BTW.)
Use of `moto.mock_aws` by itself can lead to authentication errors. The lsst.resources.s3utils.clean_test_environment_for_s3 context provides a clean slate to run in.
The mocks were previously only used for testing LSST cameras' sidecars, but upcoming HSC tests will test check_for_snap, which is bucket-based.
This decouples check_for_snap from the contents of activator.py. The behavior is unchanged. (Unfortunately, tbe boto3 API does not have a useful Bucket object, and making a proxy isn't worth it.)
check_for_snap is much more tightly coupled to the raws code (paths, parsing, etc.) than to the activator (bucket access). The activator is still responsible for initializing the S3 client.
The microservice tracks metadata for images that have been recently ingested, providing a backup for the bucket notifications.
The microservice maps metadata to filenames without requiring that the latter be a deterministic function of the former, which for Rubin instruments it isn't.
db85f4b
to
f47c4a4
Compare
This PR adds support for the raw image microservice added on DM-39022. The service is optional; if it is not initialized, the code will behave as it did previously.